//
//  TableCell.h
//  HBTobaccoHD
//
//  Created by M ac on 11-1-7.
//  Copyright 2011 Tiantium. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <StoreKit/StoreKit.h>
#import "BookItem.h"
#import "DBUtil.h"
#import "NSURL+DumbDownload.h"
#import "DumbDownloadManager.h"
#import "ReaderViewController.h"
#import "BookConstants.h"
#import "CommonDownloadWebServices.h"

@interface TableCell3 : UITableViewCell
<DumbDownloadManagerDelegate, 
SKProductsRequestDelegate,
ReaderViewControllerDelegate, 
CommonDownloadWebServicesProtocol> {
    
    BookItem *localBookItem;
	UILabel *title;
    UILabel *author;
    UILabel *column;
    UILabel *vote;
    UIImageView *faceImage;
    UIImageView *starImage;
    UIButton *buyButton;
    UIActivityIndicatorView *waitingView;
    UIImageView *fileImageView;
}
@property (nonatomic,retain) IBOutlet UILabel *title;
@property (nonatomic,retain) IBOutlet UILabel *author;
@property (nonatomic,retain) IBOutlet UILabel *column;
@property (nonatomic,retain) IBOutlet UILabel *vote;
@property (nonatomic,retain) IBOutlet UIImageView *faceImage;
@property (nonatomic,retain) IBOutlet UIImageView *starImage;
@property (nonatomic,retain) IBOutlet UIButton *buyButton;
@property(nonatomic, retain) IBOutlet UIActivityIndicatorView *waitingView;
@property(nonatomic, retain) IBOutlet UIImageView *fileImageView;


-(void)initExtend:(BookItem *)bookItem;
-(IBAction)buyButtonClick:(id)sender;
-(IBAction)detailButtonClick:(id)sender;
-(void) loadImage:(NSString *)url;
-(void) writeToFile:(NSData *)data;
@end
